<template>
  <div>
    <table>
      <tr>
        <td>ID</td>
        <td>NAME</td>
      </tr>
      <tr v-for="item in locks">
        <td>{{item.id}}</td>
        <td>{{item.name}}</td>
      </tr>
    </table>
    {{msg}}
  </div>
</template>

<script>
export default {
  name: "Lock",
  data() {
    return {
      msg: "hello world",
      locks: [
        {
          id: 1,
          name: "aaaa"
        },
        {
          id: 2,
          name: "bbbb"
        }
      ]
    }
  },
  created() {
    axios.get("http://localhost:8181/lock/findAll").then(resp => {
      this.locks = resp.data
    })
  }
}
</script>

<style scoped>

</style>